<?php
class Category_Admin_Home_Controller extends Admin_Controller {

	public $restful = true;

    public function __construct()
    {
        parent::__construct();
        //--Your Code --//
        $this->theme->set_theme("admin") ;
    }

	public function get_index($pid=0){
        $data['pid'] = $pid;
        $data['parent'] = Locations::parent($pid)->get();

        //dd($data['parent']);

        $this->theme->title("Location List");
        return $this->theme->render('location::admin.index',$data);
	}



    public function get_child($pid=0){
        $data['pid'] = $pid;
        $data['parent'] = Categories::parent($pid)->get();
        $this->theme->title("Category List");
        return $this->theme->render('category::admin.index',$data);
    }


	
}
